package main

import (
	"fmt"
	"gorm-study/src/pkg/student/models"
	"gorm-study/src/pkg/utils/dbutil"
)

func main() {
	var students []models.Student
	result := dbutil.DB.Select("name", "age").Find(&students)

	fmt.Printf("数量：%v \n", result.RowsAffected)
	for _, student := range students {
		fmt.Printf("%+v \n", student)
	}
}
